package com.book.book.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Resultvo {
    private Integer code; //2000成功，5000失败
    private String mess;
    private Object data;

    public static Resultvo success(String mess, Object data) {
        return new Resultvo(200, mess, data);
    }

    public static Resultvo error(String mess) {
        return new Resultvo(500, mess, null);
    }
}

